﻿using System;

using Fuse8.DomainFramework.Domain;

using Fuse8.ContentManagementFramework.Domain.Special;
using Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters;

namespace Fuse8.ContentManagementFramework.Domain.Commands
{
    public abstract class CmsCreateUpdateUserCommand : BaseEntityParameterCommand<CmsUserInformation, CmsCreateUpdateUserCommandParameter>
    {
        public override string CacheKey
        {
            get 
            { 
                return string.Format("SiteId_{0};SiteGroupId_{1};UserId_{2};LoginName_{3}", 
                    CommandParameter.SiteId.GetValueOrDefault(0),
                    CommandParameter.SiteGroupId.GetValueOrDefault(0),
                    CommandParameter.Id,
                    CommandParameter.LoginName);
            }
        }

        public override string CommandName
        {
            get 
            {
                return "CmsCreateUpdateUserCommand";
            }
        }
    }
}
